﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="ContentTypeRecipe"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">

 <Caption>Add Content Type</Caption>
  
  <HostData>
    <Icon File="spalm.ico" />
    <CommandBar Menu="SPALMItem"/>
  </HostData>
 
    <Arguments>
      <Argument Name="CurrentItem" Type="EnvDTE.ProjectItem, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.FirstSelectedItem, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="ContentTypeParentContentType" Type="SMC.SPALM.Types.NameValueItem, SteriaMummert.SharePoint.SoftwareFactoryLite" Required="true" >
        <ValueProvider Name="Item" Value="0x01" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultNameValueItemProvider, SteriaMummert.SharePoint.SoftwareFactoryLite"  />
      </Argument>
      <Argument Name="ContentTypeID">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.ContentTypeIDValueProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="ContentTypeName">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Content Type Name" />
      </Argument>
      <Argument Name="ContentTypeDescription">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Content Type Description" />
      </Argument>
      <Argument Name="ContentTypeContentTypeGroup">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Custom Content Types" />
      </Argument>
      <Argument Name="ContentTypeVersion">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="0" />
      </Argument>
      <Argument Name="ContentTypeFieldRefs" Required="false" Type="SMC.SPALM.Types.ContentTypeFieldRef[], SteriaMummert.SharePoint.SoftwareFactoryLite" >
        <ValueProvider ObjectType="SMC.SPALM.Types.ContentTypeFieldRef" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultCollectionProvider, SteriaMummert.SharePoint.SoftwareFactoryLite"  />
      </Argument>
      <Argument Name="ContentTypeRemoveFieldRefs" Required="false" Type="SMC.SPALM.Types.ContentTypeFieldRef[], SteriaMummert.SharePoint.SoftwareFactoryLite" >
        <ValueProvider ObjectType="SMC.SPALM.Types.ContentTypeFieldRef" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultCollectionProvider, SteriaMummert.SharePoint.SoftwareFactoryLite"  />
      </Argument>
      
    </Arguments>
    <GatheringServiceData>
      <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
        <Pages>
          <Page Height="500">            
            <Title>Content Type</Title>
            <Fields>
              <Field ValueName="ContentTypeParentContentType" Label="Parent Content Type" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.SharePointConfigurationContentTypeEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
              <Field ValueName="ContentTypeID" Label="ID" />
              <Field ValueName="ContentTypeName" Label="Name" />
              <Field ValueName="ContentTypeDescription" Label="Description" />
              <Field ValueName="ContentTypeContentTypeGroup" Label="Group" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.SharePointConfigurationContentTypeGroupEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
              <Field ValueName="ContentTypeVersion" Label="Version" />
              <Field ValueName="ContentTypeFieldRefs" Label="Fields" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.CustomArrayEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
              <Field ValueName="ContentTypeRemoveFieldRefs" Label="Remove Fields" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.CustomArrayEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
            </Fields>
          </Page>
        </Pages>
      </Wizard>
    </GatheringServiceData>
  <Actions>
    <Action Name="GenerateElement" Template="Text\ContentType\singleelement.xml.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
      <Input Name="ContentTypeParentContentType" RecipeArgument="ContentTypeParentContentType" />
      <Input Name="ContentTypeID" RecipeArgument="ContentTypeID" />
      <Input Name="ContentTypeName" RecipeArgument="ContentTypeName" />
      <Input Name="ContentTypeDescription" RecipeArgument="ContentTypeDescription" />
      <Input Name="ContentTypeContentTypeGroup" RecipeArgument="ContentTypeContentTypeGroup" />
      <Input Name="ContentTypeVersion" RecipeArgument="ContentTypeVersion" />
      <Input Name="ContentTypeFieldRefs" RecipeArgument="ContentTypeFieldRefs" />
      <Input Name="ContentTypeRemoveFieldRefs" RecipeArgument="ContentTypeRemoveFieldRefs" />
      <Output Name="Content" />
    </Action>
    <Action Name="AddElementToXml" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddContentToXmlNode, SteriaMummert.SharePoint.SoftwareFactoryLite" TargetNode="/ns:Elements" TargetNamespace="http://schemas.microsoft.com/sharepoint/">
      <Input Name="Content" ActionOutput="GenerateElement.Content" />
      <Input Name="Item" RecipeArgument="CurrentItem" />
    </Action>
  </Actions>
</Recipe>